package com.lemon.exam.common.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * 树形选择视图对象
 *
 * @author Lemon
 * @since 2025/4/24 11:17
 */
@Getter
@Setter
@ToString
@Schema(name = "树形选择 - 视图对象")
public class TreeSelectVO {
    private Long value;
    private String label;
    private boolean disabled;
    private Long parentId;
    private List<TreeSelectVO> children;

    public TreeSelectVO(Long value, String label, List<TreeSelectVO> children) {
        this.value = value;
        this.label = label;
        this.disabled = false;
        this.children = children;
    }

    public TreeSelectVO(Long value, String label, boolean disabled, List<TreeSelectVO> children) {
        this.value = value;
        this.label = label;
        this.disabled = disabled;
        this.children = children;
    }

    public TreeSelectVO(Long value, String label, boolean disabled, Long parentId, List<TreeSelectVO> children) {
        this.value = value;
        this.label = label;
        this.disabled = disabled;
        this.parentId = parentId;
        this.children = children;
    }
}
